<!DOCTYPE>
<html>
<head>
<#include "../include/base.ftl">
<title>主页</title>
<script src="/script/jquery-1.7.1.js"></script>
</head>
<body>
<button json>POST</button>
<script>
$("button[json]").click(function(){
	$.ajax({
		type:"post",
		url:"/test/json",
		data:{username:"ajax", password:"pass"},
		error:function(err){
			alert("error");
		},
		success:function(result){
			alert("success");
			alert(result.username+"---"+result.password);
		}
	});

});
</script>
</body>
</html>